package com.waterfallscroll.view.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.waterfallscroll.view.bean.ImageInfoBean;

import java.util.List;

/**
 * <h3>Description</h3> 瀑布流适配器 可以继承该类
 * TODO
 * <h3>Author</h3> luzhenbang
 * <h3>Date</h3> 2016/1/14 12:45
 * <h3>Copyright</h3> Copyright (c)2016 Shenzhen Tentinet Technology Co., Ltd. Inc. All rights reserved.
 */
public abstract class WaterfallFlowAdapter extends WaterfallBaseAdapter<ImageInfoBean> {

    private Context context;
    /**
     * 有参构造方法
     * <h3>Version</h3> 1.0
     * <h3>CreateTime</h3> 2016/1/14,11:55
     * <h3>UpdateTime</h3> 2016/1/14,11:55
     * <h3>CreateAuthor</h3> luzhenbang
     * <h3>UpdateAuthor</h3>
     * <h3>UpdateInfo</h3> (此处输入修改内容,若无修改可不写.)
     *
     * @param list 数据源集合
     */
    public WaterfallFlowAdapter(List<ImageInfoBean> list , Context context) {
        super(list,context);
        this.context = context;
    }

    /**
     * 这个方法提供item布局
     * <h3>Version</h3> 1.0
     * <h3>CreateTime</h3> 2016/1/15,9:17
     * <h3>UpdateTime</h3> 2016/1/15,9:17
     * <h3>CreateAuthor</h3> luzhenbang
     * <h3>UpdateAuthor</h3>
     * <h3>UpdateInfo</h3> (此处输入修改内容,若无修改可不写.)
     *
     * @return item布局
     */
    @Override
    public View getView() {
        return getItemView();
    }


    @Override
    public ImageView getImageViewOfItemView(View itemView) {
        return getImageViewOfItemView2(itemView);
    }

    /**
     * 这个方法提供item布局
     * <h3>Version</h3> 1.0
     * <h3>CreateTime</h3> 2016/1/15,9:17
     * <h3>UpdateTime</h3> 2016/1/15,9:17
     * <h3>CreateAuthor</h3> luzhenbang
     * <h3>UpdateAuthor</h3>
     * <h3>UpdateInfo</h3> (此处输入修改内容,若无修改可不写.)
     *
     * @return item布局
     */
    public abstract View getItemView();

    /**
     * 获取item 中的ImageView控件
     * <h3>Version</h3> 1.0
     * <h3>CreateTime</h3> 2016/1/15,10:40
     * <h3>UpdateTime</h3> 2016/1/15,10:40
     * <h3>CreateAuthor</h3> luzhenbang
     * <h3>UpdateAuthor</h3>
     * <h3>UpdateInfo</h3> (此处输入修改内容,若无修改可不写.)
     *
     * @param itemView item 布局
     * @return item 中的ImageView控件
     */
    public abstract ImageView getImageViewOfItemView2(View itemView);

}
